USE [AyeneyZohor]
GO
/****** Object:  StoredProcedure [dbo].[Adviser_Name_Job]    Script Date: 05/26/2012 17:07:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		  
-- Create date: 91 03 06
-- Description:	     ϐ             .
-- =============================================
CREATE PROCEDURE [dbo].[Adviser_Name_Job]
	-- Add the parameters for the stored procedure here
	@ADNPJ int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	select distinct  person.FName +' '+Person.LName 
	from Preform , Adviser , Person ,Job
	where adviser.NationID = person.NationID 
	and Preform.Commander1=person.FName +' '+Person.LName
	and  job.JBID = @ADNPJ
	--   И             ѐ  .  1412 . 
END

-------------------------------------------------------------------------------------------
USE [AyeneyZohor]
GO
/****** Object:  StoredProcedure [dbo].[Student_Average_Up]    Script Date: 05/25/2012 12:36:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		  
-- Create date: 91 03 05
-- Description:	               
-- =============================================
ALTER PROCEDURE [dbo].[Student_Average_Up]
	-- Add the parameters for the stored procedure here
	@Average_Num float = 0 
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	select person.FName , Student.SchoolName  
	from Student , person
	where person.NationID = Student.NationID
	  and LastAverage >@Average_Num


END
